package com.vates.vsp.practico.alumnos.service.impl;

import org.springframework.stereotype.Repository;

import com.vates.vsp.practico.alumnos.business.Alumnos;
import com.vates.vsp.practico.alumnos.service.AlumnoService;
import com.vates.vsp.practico.commons.AbstractBaseService;

@Repository("alumnoService")
public class AlumnoServiceImpl extends AbstractBaseService implements
		AlumnoService {

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.vates.vsp.practico.alumnos.service.impl.AlumnoService#getAlumno(java
	 * .lang.Integer)
	 */
	@Override
	public Alumnos getAlumno(Integer id) {
		return this.get(Alumnos.class, id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.vates.vsp.practico.alumnos.service.impl.AlumnoService#guardarAlumno
	 * (com.vates.vsp.practico.alumnos.business.Alumnos)
	 */
	@Override
	public void guardarAlumno(Alumnos alumno) {
		this.getHibernateTemplate().saveOrUpdate(alumno);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.vates.vsp.practico.alumnos.service.impl.AlumnoService#deleteAlumno
	 * (com.vates.vsp.practico.alumnos.business.Alumnos)
	 */
	@Override
	public void deleteAlumno(Alumnos alumno) {
		this.getHibernateTemplate().delete(alumno);
	}

}
